name_list = ["张三", "李四", "王五"]
# 查找数据
print(name_list[0])
# 查找index
print(name_list.index("王五"))
# 修改
name_list[1] = "lisi"
#增加
name_list.append("wangxiaoer")
#在指定索引位置添加数据
name_list.insert(1,"xiaomei")

#追加数据到列表
temp_list = ["孙悟空","周八戒","沙师弟"]
name_list.extend(temp_list)

#删除
name_list.remove("xiaomei")
name_list.pop()
name_list.pop(5)
name_list.clear()
i = 0
while i < len(name_list):
    print("i=%d,数据：%s" % (i,name_list[i]))
    i += 1
